using System.Collections.Generic;
using UnityEditor;
using UnityEngine;

namespace LS.UnityExtensions.Editor
{
    public sealed class UnityExtensionsEditorConfigProvider : ProjectSettingProvider<UnityExtensionsEditorConfigProvider, UnityExtensionsEditorConfig>
    {
        public UnityExtensionsEditorConfigProvider() : this($"Project/Unity Extensions",new []{"Extensions", "Config", "UnityExtensionsEditorConfig", "UnityExtensions"})
        {
            
        }
        public UnityExtensionsEditorConfigProvider(string path, IEnumerable<string> keywords = null) : base(path, keywords)
        {
            
        }

        protected override UnityExtensionsEditorConfig GetSetting()
        {
            return UnityExtensionsEditorConfig.Instance;
        }
        
        [SettingsProvider]
        public static SettingsProvider CreateSettingsProvider()
        {
            if (Instance == null)
            {
                Instance = new UnityExtensionsEditorConfigProvider();
            }
            return Instance;
        }

    }
}